/**
 *  iBizSys 5.0 机器人生产代码（不要直接修改当前代码）
 *  http://www.ibizsys.net
 */
package com.sa.ibiz.demo.srv.demo.entity;


import java.io.Serializable;
import java.util.HashMap;
import java.util.ArrayList;

import javax.persistence.Column;

import java.sql.Timestamp;
import net.ibizsys.paas.data.IDataObject;
import net.ibizsys.paas.data.DataObject;
import net.ibizsys.paas.util.StringHelper;
import net.sf.json.JSONObject;
import net.ibizsys.paas.util.JSONObjectHelper;
import net.ibizsys.paas.xml.XmlNode;
import net.ibizsys.paas.service.ServiceGlobal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * 实体[IBZ5SOFTWARE] 数据对象
 */
public class IBZ5SOFTWARE extends net.ibizsys.paas.entity.EntityBase implements Serializable {

    private static final long serialVersionUID = -1L;
    private static final Log log = LogFactory.getLog(IBZ5SOFTWARE.class);
    /**
     *   实体属性标识[建立时间]
     */
    public final static String FIELD_CREATEDATE = "CREATEDATE";
    /**
     *   实体属性标识[建立人]
     */
    public final static String FIELD_CREATEMAN = "CREATEMAN";
    /**
     *   实体属性标识[软件标识]
     */
    public final static String FIELD_IBZ5SOFTWAREID = "IBZ5SOFTWAREID";
    /**
     *   实体属性标识[软件名称]
     */
    public final static String FIELD_IBZ5SOFTWARENAME = "IBZ5SOFTWARENAME";
    /**
     *   实体属性标识[生产厂商]
     */
    public final static String FIELD_PRODUCER = "PRODUCER";
    /**
     *   实体属性标识[产品编号]
     */
    public final static String FIELD_PRODUCTUID = "PRODUCTUID";
    /**
     *   实体属性标识[单位]
     */
    public final static String FIELD_UNIT = "UNIT";
    /**
     *   实体属性标识[单价]
     */
    public final static String FIELD_UNITPRICE = "UNITPRICE";
    /**
     *   实体属性标识[更新时间]
     */
    public final static String FIELD_UPDATEDATE = "UPDATEDATE";
    /**
     *   实体属性标识[更新人]
     */
    public final static String FIELD_UPDATEMAN = "UPDATEMAN";

    private final static int INDEX_CREATEDATE = 0;
    private final static int INDEX_CREATEMAN = 1;
    private final static int INDEX_IBZ5SOFTWAREID = 2;
    private final static int INDEX_IBZ5SOFTWARENAME = 3;
    private final static int INDEX_PRODUCER = 4;
    private final static int INDEX_PRODUCTUID = 5;
    private final static int INDEX_UNIT = 6;
    private final static int INDEX_UNITPRICE = 7;
    private final static int INDEX_UPDATEDATE = 8;
    private final static int INDEX_UPDATEMAN = 9;

    private final static HashMap<String, Integer> fieldIndexMap = new HashMap<String, Integer>();
    static {
        fieldIndexMap.put( FIELD_CREATEDATE, INDEX_CREATEDATE);
        fieldIndexMap.put( FIELD_CREATEMAN, INDEX_CREATEMAN);
        fieldIndexMap.put( FIELD_IBZ5SOFTWAREID, INDEX_IBZ5SOFTWAREID);
        fieldIndexMap.put( FIELD_IBZ5SOFTWARENAME, INDEX_IBZ5SOFTWARENAME);
        fieldIndexMap.put( FIELD_PRODUCER, INDEX_PRODUCER);
        fieldIndexMap.put( FIELD_PRODUCTUID, INDEX_PRODUCTUID);
        fieldIndexMap.put( FIELD_UNIT, INDEX_UNIT);
        fieldIndexMap.put( FIELD_UNITPRICE, INDEX_UNITPRICE);
        fieldIndexMap.put( FIELD_UPDATEDATE, INDEX_UPDATEDATE);
        fieldIndexMap.put( FIELD_UPDATEMAN, INDEX_UPDATEMAN);
    }

    private IBZ5SOFTWARE proxyIBZ5SOFTWARE = null;

    public IBZ5SOFTWARE() {
        super();
    }
    private boolean createdateDirtyFlag = false;
    private boolean createmanDirtyFlag = false;
    private boolean ibz5softwareidDirtyFlag = false;
    private boolean ibz5softwarenameDirtyFlag = false;
    private boolean producerDirtyFlag = false;
    private boolean productuidDirtyFlag = false;
    private boolean unitDirtyFlag = false;
    private boolean unitpriceDirtyFlag = false;
    private boolean updatedateDirtyFlag = false;
    private boolean updatemanDirtyFlag = false;

    @Column(name="createdate")
    private Timestamp createdate;
    @Column(name="createman")
    private String createman;
    @Column(name="ibz5softwareid")
    private String ibz5softwareid;
    @Column(name="ibz5softwarename")
    private String ibz5softwarename;
    @Column(name="producer")
    private String producer;
    @Column(name="productuid")
    private String productuid;
    @Column(name="unit")
    private String unit;
    @Column(name="unitprice")
    private Double unitprice;
    @Column(name="updatedate")
    private Timestamp updatedate;
    @Column(name="updateman")
    private String updateman;


    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreateDate(Timestamp createdate) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setCreateDate(createdate);
            return;
        }
        this.createdate =  createdate;
        this.createdateDirtyFlag  = true;
    }

    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreateDate() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getCreateDate();
        }
        return this.createdate;
    }

    /**
     *  获取属性值[建立时间]是否修改
     */
    public boolean isCreateDateDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isCreateDateDirty();
        }
        return this.createdateDirtyFlag;
    }

    /**
     *  重置属性值[建立时间]
     */
    public void resetCreateDate() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetCreateDate();
            return;
        }

        this.createdateDirtyFlag = false;
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     *  @param createman
     */
    public void setCreateMan(String createman) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setCreateMan(createman);
            return;
        }
        if(createman!=null) {
            createman = StringHelper.trimRight(createman);
            if(createman.length()==0) {
                createman = null;
            }
        }
        this.createman =  createman;
        this.createmanDirtyFlag  = true;
    }

    /**
     *  获取属性值[建立人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     */
    public String getCreateMan() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getCreateMan();
        }
        return this.createman;
    }

    /**
     *  获取属性值[建立人]是否修改
     */
    public boolean isCreateManDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isCreateManDirty();
        }
        return this.createmanDirtyFlag;
    }

    /**
     *  重置属性值[建立人]
     */
    public void resetCreateMan() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetCreateMan();
            return;
        }

        this.createmanDirtyFlag = false;
        this.createman = null;
    }
    /**
     *  设置属性值[软件标识]
     *  @param ibz5softwareid
     */
    public void setIBZ5SOFTWAREId(String ibz5softwareid) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setIBZ5SOFTWAREId(ibz5softwareid);
            return;
        }
        if(ibz5softwareid!=null) {
            ibz5softwareid = StringHelper.trimRight(ibz5softwareid);
            if(ibz5softwareid.length()==0) {
                ibz5softwareid = null;
            }
        }
        this.ibz5softwareid =  ibz5softwareid;
        this.ibz5softwareidDirtyFlag  = true;
    }

    /**
     *  获取属性值[软件标识]
     */
    public String getIBZ5SOFTWAREId() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getIBZ5SOFTWAREId();
        }
        return this.ibz5softwareid;
    }

    /**
     *  获取属性值[软件标识]是否修改
     */
    public boolean isIBZ5SOFTWAREIdDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isIBZ5SOFTWAREIdDirty();
        }
        return this.ibz5softwareidDirtyFlag;
    }

    /**
     *  重置属性值[软件标识]
     */
    public void resetIBZ5SOFTWAREId() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetIBZ5SOFTWAREId();
            return;
        }

        this.ibz5softwareidDirtyFlag = false;
        this.ibz5softwareid = null;
    }
    /**
     *  设置属性值[软件名称]
     *  @param ibz5softwarename
     */
    public void setIBZ5SOFTWAREName(String ibz5softwarename) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setIBZ5SOFTWAREName(ibz5softwarename);
            return;
        }
        if(ibz5softwarename!=null) {
            ibz5softwarename = StringHelper.trimRight(ibz5softwarename);
            if(ibz5softwarename.length()==0) {
                ibz5softwarename = null;
            }
        }
        this.ibz5softwarename =  ibz5softwarename;
        this.ibz5softwarenameDirtyFlag  = true;
    }

    /**
     *  获取属性值[软件名称]
     */
    public String getIBZ5SOFTWAREName() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getIBZ5SOFTWAREName();
        }
        return this.ibz5softwarename;
    }

    /**
     *  获取属性值[软件名称]是否修改
     */
    public boolean isIBZ5SOFTWARENameDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isIBZ5SOFTWARENameDirty();
        }
        return this.ibz5softwarenameDirtyFlag;
    }

    /**
     *  重置属性值[软件名称]
     */
    public void resetIBZ5SOFTWAREName() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetIBZ5SOFTWAREName();
            return;
        }

        this.ibz5softwarenameDirtyFlag = false;
        this.ibz5softwarename = null;
    }
    /**
     *  设置属性值[生产厂商]
     *  @param producer
     */
    public void setPRODUCER(String producer) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setPRODUCER(producer);
            return;
        }
        if(producer!=null) {
            producer = StringHelper.trimRight(producer);
            if(producer.length()==0) {
                producer = null;
            }
        }
        this.producer =  producer;
        this.producerDirtyFlag  = true;
    }

    /**
     *  获取属性值[生产厂商]
     */
    public String getPRODUCER() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getPRODUCER();
        }
        return this.producer;
    }

    /**
     *  获取属性值[生产厂商]是否修改
     */
    public boolean isPRODUCERDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isPRODUCERDirty();
        }
        return this.producerDirtyFlag;
    }

    /**
     *  重置属性值[生产厂商]
     */
    public void resetPRODUCER() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetPRODUCER();
            return;
        }

        this.producerDirtyFlag = false;
        this.producer = null;
    }
    /**
     *  设置属性值[产品编号]
     *  @param productuid
     */
    public void setProductUID(String productuid) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setProductUID(productuid);
            return;
        }
        if(productuid!=null) {
            productuid = StringHelper.trimRight(productuid);
            if(productuid.length()==0) {
                productuid = null;
            }
        }
        this.productuid =  productuid;
        this.productuidDirtyFlag  = true;
    }

    /**
     *  获取属性值[产品编号]
     */
    public String getProductUID() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getProductUID();
        }
        return this.productuid;
    }

    /**
     *  获取属性值[产品编号]是否修改
     */
    public boolean isProductUIDDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isProductUIDDirty();
        }
        return this.productuidDirtyFlag;
    }

    /**
     *  重置属性值[产品编号]
     */
    public void resetProductUID() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetProductUID();
            return;
        }

        this.productuidDirtyFlag = false;
        this.productuid = null;
    }
    /**
     *  设置属性值[单位]
     *  @param unit
     */
    public void setUNIT(String unit) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUNIT(unit);
            return;
        }
        if(unit!=null) {
            unit = StringHelper.trimRight(unit);
            if(unit.length()==0) {
                unit = null;
            }
        }
        this.unit =  unit;
        this.unitDirtyFlag  = true;
    }

    /**
     *  获取属性值[单位]
     */
    public String getUNIT() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUNIT();
        }
        return this.unit;
    }

    /**
     *  获取属性值[单位]是否修改
     */
    public boolean isUNITDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUNITDirty();
        }
        return this.unitDirtyFlag;
    }

    /**
     *  重置属性值[单位]
     */
    public void resetUNIT() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUNIT();
            return;
        }

        this.unitDirtyFlag = false;
        this.unit = null;
    }
    /**
     *  设置属性值[单价]
     *  @param unitprice
     */
    public void setUnitPrice(Double unitprice) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUnitPrice(unitprice);
            return;
        }
        this.unitprice =  unitprice;
        this.unitpriceDirtyFlag  = true;
    }

    /**
     *  获取属性值[单价]
     */
    public Double getUnitPrice() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUnitPrice();
        }
        return this.unitprice;
    }

    /**
     *  获取属性值[单价]是否修改
     */
    public boolean isUnitPriceDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUnitPriceDirty();
        }
        return this.unitpriceDirtyFlag;
    }

    /**
     *  重置属性值[单价]
     */
    public void resetUnitPrice() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUnitPrice();
            return;
        }

        this.unitpriceDirtyFlag = false;
        this.unitprice = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdateDate(Timestamp updatedate) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUpdateDate(updatedate);
            return;
        }
        this.updatedate =  updatedate;
        this.updatedateDirtyFlag  = true;
    }

    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdateDate() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUpdateDate();
        }
        return this.updatedate;
    }

    /**
     *  获取属性值[更新时间]是否修改
     */
    public boolean isUpdateDateDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUpdateDateDirty();
        }
        return this.updatedateDirtyFlag;
    }

    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdateDate() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUpdateDate();
            return;
        }

        this.updatedateDirtyFlag = false;
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     *  @param updateman
     */
    public void setUpdateMan(String updateman) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUpdateMan(updateman);
            return;
        }
        if(updateman!=null) {
            updateman = StringHelper.trimRight(updateman);
            if(updateman.length()==0) {
                updateman = null;
            }
        }
        this.updateman =  updateman;
        this.updatemanDirtyFlag  = true;
    }

    /**
     *  获取属性值[更新人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     */
    public String getUpdateMan() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUpdateMan();
        }
        return this.updateman;
    }

    /**
     *  获取属性值[更新人]是否修改
     */
    public boolean isUpdateManDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUpdateManDirty();
        }
        return this.updatemanDirtyFlag;
    }

    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateMan() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUpdateMan();
            return;
        }

        this.updatemanDirtyFlag = false;
        this.updateman = null;
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onReset()
     */
    @Override
    protected void onReset() {
        IBZ5SOFTWARE.resetAll(this);
        super.onReset();
    }

    /**
     * 重置当前数据对象属性值
     * @param entity
     */
    private static void resetAll(IBZ5SOFTWARE et) {
        et.resetCreateDate();
        et.resetCreateMan();
        et.resetIBZ5SOFTWAREId();
        et.resetIBZ5SOFTWAREName();
        et.resetPRODUCER();
        et.resetProductUID();
        et.resetUNIT();
        et.resetUnitPrice();
        et.resetUpdateDate();
        et.resetUpdateMan();
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onFillMap(java.util.HashMap, boolean)
     */
    @Override
    protected void onFillMap(HashMap<String, Object> params, boolean bDirtyOnly) {
        if(!bDirtyOnly || isCreateDateDirty()) {
            params.put(FIELD_CREATEDATE,getCreateDate());
        }
        if(!bDirtyOnly || isCreateManDirty()) {
            params.put(FIELD_CREATEMAN,getCreateMan());
        }
        if(!bDirtyOnly || isIBZ5SOFTWAREIdDirty()) {
            params.put(FIELD_IBZ5SOFTWAREID,getIBZ5SOFTWAREId());
        }
        if(!bDirtyOnly || isIBZ5SOFTWARENameDirty()) {
            params.put(FIELD_IBZ5SOFTWARENAME,getIBZ5SOFTWAREName());
        }
        if(!bDirtyOnly || isPRODUCERDirty()) {
            params.put(FIELD_PRODUCER,getPRODUCER());
        }
        if(!bDirtyOnly || isProductUIDDirty()) {
            params.put(FIELD_PRODUCTUID,getProductUID());
        }
        if(!bDirtyOnly || isUNITDirty()) {
            params.put(FIELD_UNIT,getUNIT());
        }
        if(!bDirtyOnly || isUnitPriceDirty()) {
            params.put(FIELD_UNITPRICE,getUnitPrice());
        }
        if(!bDirtyOnly || isUpdateDateDirty()) {
            params.put(FIELD_UPDATEDATE,getUpdateDate());
        }
        if(!bDirtyOnly || isUpdateManDirty()) {
            params.put(FIELD_UPDATEMAN,getUpdateMan());
        }
        super.onFillMap(params, bDirtyOnly);
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#get(java.lang.String)
     */
    @Override
    public Object get(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().get(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.get(strParamName);

        return  IBZ5SOFTWARE.get(this, index);
    }

    /**
     * 通过属性标识获取属性值
     * @param et 数据对象
     * @param index 属性标识
     * @return
     * @throws Exception
     */
    private static Object get(IBZ5SOFTWARE et,int index) throws Exception {

        switch(index) {
        case INDEX_CREATEDATE:
            return et.getCreateDate();
        case INDEX_CREATEMAN:
            return et.getCreateMan();
        case INDEX_IBZ5SOFTWAREID:
            return et.getIBZ5SOFTWAREId();
        case INDEX_IBZ5SOFTWARENAME:
            return et.getIBZ5SOFTWAREName();
        case INDEX_PRODUCER:
            return et.getPRODUCER();
        case INDEX_PRODUCTUID:
            return et.getProductUID();
        case INDEX_UNIT:
            return et.getUNIT();
        case INDEX_UNITPRICE:
            return et.getUnitPrice();
        case INDEX_UPDATEDATE:
            return et.getUpdateDate();
        case INDEX_UPDATEMAN:
            return et.getUpdateMan();
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#set(java.lang.String, java.lang.Object)
     */
    @Override
    public void set(String strParamName,Object objValue) throws Exception {
        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().set(strParamName,objValue);
            return;
        }
        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");

        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null) {
            super.set(strParamName,objValue);
            return;
        }

        IBZ5SOFTWARE.set(this,index,objValue);
    }

    /**
     * 通过属性标识设定属性值
     * @param et 数据对象
     * @param index 属性标识
     * @param obj 值
     * @throws Exception
     */
    private static void set(IBZ5SOFTWARE et,int index,Object obj) throws Exception {
        switch(index) {
        case INDEX_CREATEDATE:
            et.setCreateDate(DataObject.getTimestampValue(obj));
            return ;
        case INDEX_CREATEMAN:
            et.setCreateMan(DataObject.getStringValue(obj));
            return ;
        case INDEX_IBZ5SOFTWAREID:
            et.setIBZ5SOFTWAREId(DataObject.getStringValue(obj));
            return ;
        case INDEX_IBZ5SOFTWARENAME:
            et.setIBZ5SOFTWAREName(DataObject.getStringValue(obj));
            return ;
        case INDEX_PRODUCER:
            et.setPRODUCER(DataObject.getStringValue(obj));
            return ;
        case INDEX_PRODUCTUID:
            et.setProductUID(DataObject.getStringValue(obj));
            return ;
        case INDEX_UNIT:
            et.setUNIT(DataObject.getStringValue(obj));
            return ;
        case INDEX_UNITPRICE:
            et.setUnitPrice(DataObject.getDoubleValue(obj));
            return ;
        case INDEX_UPDATEDATE:
            et.setUpdateDate(DataObject.getTimestampValue(obj));
            return ;
        case INDEX_UPDATEMAN:
            et.setUpdateMan(DataObject.getStringValue(obj));
            return ;
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#isNull(java.lang.String)
     */
    @Override
    public boolean isNull(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isNull(strParamName);
        }
        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");

        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.isNull(strParamName);

        return  IBZ5SOFTWARE.isNull(this, index);
    }

    /**
     * 判断指定属性值是否为空值
     * @param et
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean isNull(IBZ5SOFTWARE et,int index) throws Exception {

        switch(index) {
        case INDEX_CREATEDATE:
            return et.getCreateDate()==null;
        case INDEX_CREATEMAN:
            return et.getCreateMan()==null;
        case INDEX_IBZ5SOFTWAREID:
            return et.getIBZ5SOFTWAREId()==null;
        case INDEX_IBZ5SOFTWARENAME:
            return et.getIBZ5SOFTWAREName()==null;
        case INDEX_PRODUCER:
            return et.getPRODUCER()==null;
        case INDEX_PRODUCTUID:
            return et.getProductUID()==null;
        case INDEX_UNIT:
            return et.getUNIT()==null;
        case INDEX_UNITPRICE:
            return et.getUnitPrice()==null;
        case INDEX_UPDATEDATE:
            return et.getUpdateDate()==null;
        case INDEX_UPDATEMAN:
            return et.getUpdateMan()==null;
        default:
            throw new Exception("不明属性标识");
        }
    }


    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#contains(java.lang.String)
     */
    @Override
    public boolean contains(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().contains(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.contains(strParamName);

        return  IBZ5SOFTWARE.contains(this, index);
    }

    /**
     * 获取判断对象是否存在指定属性值
     * @param et
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean contains(IBZ5SOFTWARE et,int index) throws Exception {

        switch(index) {
        case INDEX_CREATEDATE:
            return et.isCreateDateDirty();
        case INDEX_CREATEMAN:
            return et.isCreateManDirty();
        case INDEX_IBZ5SOFTWAREID:
            return et.isIBZ5SOFTWAREIdDirty();
        case INDEX_IBZ5SOFTWARENAME:
            return et.isIBZ5SOFTWARENameDirty();
        case INDEX_PRODUCER:
            return et.isPRODUCERDirty();
        case INDEX_PRODUCTUID:
            return et.isProductUIDDirty();
        case INDEX_UNIT:
            return et.isUNITDirty();
        case INDEX_UNITPRICE:
            return et.isUnitPriceDirty();
        case INDEX_UPDATEDATE:
            return et.isUpdateDateDirty();
        case INDEX_UPDATEMAN:
            return et.isUpdateManDirty();
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onFillJSONObject(net.sf.json.JSONObject, boolean)
     */
    @Override
    protected void onFillJSONObject(JSONObject objJSON, boolean bIncludeEmpty) throws Exception {
        fillJSONObject(this,objJSON,bIncludeEmpty);
        super.onFillJSONObject(objJSON, bIncludeEmpty);
    }

    /**
     * 填充当前对象到JSON
     * @param et 当前数据对象
     * @param json JSON对象
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static  void fillJSONObject(IBZ5SOFTWARE et,JSONObject json, boolean bIncEmpty) throws Exception {
        if(bIncEmpty||et.getCreateDate()!=null) {
            JSONObjectHelper.put(json,"createdate",getJSONValue(et.getCreateDate()),false);
        }
        if(bIncEmpty||et.getCreateMan()!=null) {
            JSONObjectHelper.put(json,"createman",getJSONValue(et.getCreateMan()),false);
        }
        if(bIncEmpty||et.getIBZ5SOFTWAREId()!=null) {
            JSONObjectHelper.put(json,"ibz5softwareid",getJSONValue(et.getIBZ5SOFTWAREId()),false);
        }
        if(bIncEmpty||et.getIBZ5SOFTWAREName()!=null) {
            JSONObjectHelper.put(json,"ibz5softwarename",getJSONValue(et.getIBZ5SOFTWAREName()),false);
        }
        if(bIncEmpty||et.getPRODUCER()!=null) {
            JSONObjectHelper.put(json,"producer",getJSONValue(et.getPRODUCER()),false);
        }
        if(bIncEmpty||et.getProductUID()!=null) {
            JSONObjectHelper.put(json,"productuid",getJSONValue(et.getProductUID()),false);
        }
        if(bIncEmpty||et.getUNIT()!=null) {
            JSONObjectHelper.put(json,"unit",getJSONValue(et.getUNIT()),false);
        }
        if(bIncEmpty||et.getUnitPrice()!=null) {
            JSONObjectHelper.put(json,"unitprice",getJSONValue(et.getUnitPrice()),false);
        }
        if(bIncEmpty||et.getUpdateDate()!=null) {
            JSONObjectHelper.put(json,"updatedate",getJSONValue(et.getUpdateDate()),false);
        }
        if(bIncEmpty||et.getUpdateMan()!=null) {
            JSONObjectHelper.put(json,"updateman",getJSONValue(et.getUpdateMan()),false);
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onFillXmlNode(net.ibizsys.paas.xml.XmlNode, boolean)
     */
    @Override
    protected void onFillXmlNode(XmlNode xmlNode,boolean bIncludeEmpty) throws Exception {
        fillXmlNode(this,xmlNode,bIncludeEmpty);
        super.onFillXmlNode(xmlNode, bIncludeEmpty);
    }

    /**
     * 填充当前对象到Xml节点中
     * @param et 当前数据对象
     * @param node Xml节点
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static void fillXmlNode(IBZ5SOFTWARE et,XmlNode node,boolean bIncEmpty) throws Exception {
        if(bIncEmpty||et.getCreateDate()!=null) {
            Object obj = et.getCreateDate();
            node.setAttribute("CREATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
        }
        if(bIncEmpty||et.getCreateMan()!=null) {
            Object obj = et.getCreateMan();
            node.setAttribute("CREATEMAN",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getIBZ5SOFTWAREId()!=null) {
            Object obj = et.getIBZ5SOFTWAREId();
            node.setAttribute("IBZ5SOFTWAREID",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getIBZ5SOFTWAREName()!=null) {
            Object obj = et.getIBZ5SOFTWAREName();
            node.setAttribute("IBZ5SOFTWARENAME",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getPRODUCER()!=null) {
            Object obj = et.getPRODUCER();
            node.setAttribute("PRODUCER",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getProductUID()!=null) {
            Object obj = et.getProductUID();
            node.setAttribute("PRODUCTUID",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getUNIT()!=null) {
            Object obj = et.getUNIT();
            node.setAttribute("UNIT",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getUnitPrice()!=null) {
            Object obj = et.getUnitPrice();
            node.setAttribute("UNITPRICE",(obj==null)?"":StringHelper.format("%1$s",obj));
        }
        if(bIncEmpty||et.getUpdateDate()!=null) {
            Object obj = et.getUpdateDate();
            node.setAttribute("UPDATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
        }
        if(bIncEmpty||et.getUpdateMan()!=null) {
            Object obj = et.getUpdateMan();
            node.setAttribute("UPDATEMAN",(obj==null)?"":(String)obj);
        }


    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onCopyTo(net.ibizsys.paas.data.IDataObject, boolean)
     */
    @Override
    protected void onCopyTo(IDataObject dataEntity, boolean bIncludeEmtpy) throws Exception {
        IBZ5SOFTWARE.copyTo(this,dataEntity,bIncludeEmtpy);
        super.onCopyTo(dataEntity,bIncludeEmtpy);
    }

    /**
     * 复制当前对象数据到目标对象
     * @param et 当前数据对象
     * @param dst 目标数据对象
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static void copyTo(IBZ5SOFTWARE et,IDataObject dst,boolean bIncEmpty) throws Exception {
        if(et.isCreateDateDirty() && (bIncEmpty||et.getCreateDate()!=null)) {
            dst.set(FIELD_CREATEDATE,et.getCreateDate());
        }
        if(et.isCreateManDirty() && (bIncEmpty||et.getCreateMan()!=null)) {
            dst.set(FIELD_CREATEMAN,et.getCreateMan());
        }
        if(et.isIBZ5SOFTWAREIdDirty() && (bIncEmpty||et.getIBZ5SOFTWAREId()!=null)) {
            dst.set(FIELD_IBZ5SOFTWAREID,et.getIBZ5SOFTWAREId());
        }
        if(et.isIBZ5SOFTWARENameDirty() && (bIncEmpty||et.getIBZ5SOFTWAREName()!=null)) {
            dst.set(FIELD_IBZ5SOFTWARENAME,et.getIBZ5SOFTWAREName());
        }
        if(et.isPRODUCERDirty() && (bIncEmpty||et.getPRODUCER()!=null)) {
            dst.set(FIELD_PRODUCER,et.getPRODUCER());
        }
        if(et.isProductUIDDirty() && (bIncEmpty||et.getProductUID()!=null)) {
            dst.set(FIELD_PRODUCTUID,et.getProductUID());
        }
        if(et.isUNITDirty() && (bIncEmpty||et.getUNIT()!=null)) {
            dst.set(FIELD_UNIT,et.getUNIT());
        }
        if(et.isUnitPriceDirty() && (bIncEmpty||et.getUnitPrice()!=null)) {
            dst.set(FIELD_UNITPRICE,et.getUnitPrice());
        }
        if(et.isUpdateDateDirty() && (bIncEmpty||et.getUpdateDate()!=null)) {
            dst.set(FIELD_UPDATEDATE,et.getUpdateDate());
        }
        if(et.isUpdateManDirty() && (bIncEmpty||et.getUpdateMan()!=null)) {
            dst.set(FIELD_UPDATEMAN,et.getUpdateMan());
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#remove(java.lang.String)
     */
    @Override
    public boolean remove(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().remove(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.remove(strParamName);
        return  IBZ5SOFTWARE.remove(this, index);
    }

    /**
     * 通过属性标识删除属性值
     * @param entity
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean remove(IBZ5SOFTWARE et,int index) throws Exception {
        switch(index) {
        case INDEX_CREATEDATE:
            et.resetCreateDate();
            return true;
        case INDEX_CREATEMAN:
            et.resetCreateMan();
            return true;
        case INDEX_IBZ5SOFTWAREID:
            et.resetIBZ5SOFTWAREId();
            return true;
        case INDEX_IBZ5SOFTWARENAME:
            et.resetIBZ5SOFTWAREName();
            return true;
        case INDEX_PRODUCER:
            et.resetPRODUCER();
            return true;
        case INDEX_PRODUCTUID:
            et.resetProductUID();
            return true;
        case INDEX_UNIT:
            et.resetUNIT();
            return true;
        case INDEX_UNITPRICE:
            et.resetUnitPrice();
            return true;
        case INDEX_UPDATEDATE:
            et.resetUpdateDate();
            return true;
        case INDEX_UPDATEMAN:
            et.resetUpdateMan();
            return true;
        default:
            throw new Exception("不明属性标识");
        }
    }






    /**
     *  获取代理的数据对象
     */
    private IBZ5SOFTWARE getProxyEntity() {
        return this.proxyIBZ5SOFTWARE;
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onProxy(net.ibizsys.paas.data.IDataObject)
     */
    @Override
    protected void onProxy(IDataObject proxyDataObject) {
        this.proxyIBZ5SOFTWARE = null;
        if(proxyDataObject!=null && proxyDataObject instanceof IBZ5SOFTWARE) {
            this.proxyIBZ5SOFTWARE = (IBZ5SOFTWARE)proxyDataObject;
        }

    }

}